import { getItem, setItem } from "./base";
import fetch from "@/utils/fetch";
export const setUserInfo = (data) => setItem("userInfo", data);
export const getUserInfo = () => getItem("userInfo");

export const setToken = (data) => setItem("token", data);
export const getToken = () => getItem("token");

export const setSystemHi = (data) => setItem("systemHi", data);
export const getSystemHi = () => getItem("systemHi");

export const setSystemWi = (data) => setItem("systemWi", data);
export const getSystemWi = () => getItem("systemWi");

export const setPageData = (data) => setItem("pageData", data);
export const getPageData = () => getItem("pageData");

export const setNotice = (data) => setItem("notice", data);
export const getNotice = () => getItem("notice");

export const setCurrent = (data) => setItem("current", data);
export const getCurrent = () => getItem("current");

export const setDevice = (data) => setItem("device", data);
export const getDevice = () => getItem("device");

export const setConn = (data) => setItem("conn", data);
export const getConn = () => getItem("conn");

export const setMenu = (data) => setItem("user_uri", data);
export const getMenu = () => getItem("user_uri");

export default {
  setUserInfo,
  getUserInfo,
  setPageData,
  getPageData,
  setToken,
  getToken,
  setSystemHi,
  getSystemHi,
  setSystemWi,
  getSystemWi,
  setCurrent,
  getCurrent,
  setDevice,
  getDevice,
  setConn,
  getConn,
  setMenu,
  getMenu,
};
